html = open("ascii.html", 'w')
lines = []
lines.append("<html><head>")
lines.append("<style type='text/css'>")
lines.append("body {font-family: monospace;}")
lines.append('tr.specials {font-family: "Apple Symbols"; font-size:130%;}')
# lines.append("td {padding: 5px;width:25px}")
lines.append("table {table-layout: fixed;}")
lines.append("</style>")

lines.append("<meta charset='utf-8'>")

lines.append("</head><body><pre><table>")

# lines.append('<tr>')
# for n in range(-1, 16):
	# lines.append("<td>"+ str(n)+ '</td>',)
# lines.append('</tr>')

# lines.append('<tr>')
# for n in range(32):
	# if not n % 16:
		# lines.append('<td>'+ str(n-1)+'</td></tr><tr class="specials"><td>'+ str(n)+ '</td>')
	# lines.append('<td>'+ un[n].encode('utf-8')+ '</td>')
# lines.append('</tr>')


lines.append('<tr>')
for n in range (32, 128):
	if not n % 32:
		lines.append('</tr><tr>')
		# lines.append('<th>'+ str(n-1)+'</th></tr><tr><th>'+ str(n)+ '</th>')
	lines.append('<td>'+ chr(n)+ '<br><span style="font-size:45%;">'+str(hex(n)[2:])+'</style></td>')
lines.append('</tr>')
lines.append("</table></pre></body></html>")

html.writelines(lines)
